Prerequisites
For Local Development
| Requirement | Details |
|---|---|
| Python version | 3.10 or higher |
| Package manager | pip |
| Repository access | Git access to the project repository |
| AI Core credentials | gen-ai-core-key-new.json |
| HANA DB credentials | hana-db-credentials.json |
For BTP Cloud Foundry Deployment
| Requirement | Who Provides It |
|---|---|
| SAP BTP Cloud Foundry space access | Platform / BTP team |
Cloud Foundry CLI (cf) installed and logged in | Developer workstation |
| Docker installed with registry access configured | DevOps team |
| SAP AI Core credentials | Security / Platform team |
| HANA DB credentials | DBA / Infrastructure team |
Local Setup and Installation
Step 1: Clone the Repository
git clone <repository-url>
cd <project-folder>
Step 2: Install Python Dependencies
pip install -r requirements.txt
Step 3: Place Credential Files
project-folder/
├── gen-ai-core-key-new.json
├── hana-db-credentials.json
├── api/
├── main.py
└── requirements.txt
Step 4: Start the Backend Server
uvicorn api.server:app --host 0.0.0.0 --port 8000 --reload
| Access Point | URL |
|---|---|
| API base | http://localhost:8000 |
| Interactive API docs | http://localhost:8000/docs |
Step 5: Test via CLI
python main.py
Deployment on SAP BTP Cloud Foundry
Deployment Steps
Step 1: Build the Docker image
Step 2: Push the image to the container registry
Step 3: Deploy to Cloud Foundry:
cf push -f manifest.docker.yaml
Required Environment Variables
SAP AI Core Credentials
| Variable | Purpose |
|---|---|
AICORE_AUTH_URL | Authentication endpoint for AI Core |
AICORE_CLIENT_ID | Client ID for AI Core OAuth |
AICORE_CLIENT_SECRET | Client secret for AI Core OAuth |
AICORE_BASE_URL | Base URL for AI Core API calls |
SAP HANA DB Credentials
| Variable | Purpose |
|---|---|
HANA_HOST | HANA database host address |
HANA_PORT | HANA database port |
HANA_USER | Database username |
HANA_PASSWORD | Database password |
HANA_SCHEMA | Target schema name |